<%@ page import="com.entity.Patient" %>
<%@ page import="com.service.PatientService" %><%--
  Created by IntelliJ IDEA.
  User: HP
  Date: 2021/9/10
  Time: 21:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>病人主页</title>
    <link href="css/libiao.css" type="text/css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/loginfail.css">
</head>
<body>
<br>
<br>
<%
    Patient patient = (Patient) request.getAttribute("patientInfo");

%>
<table style="margin-left: 15%">
    <tr>
        <td><b>姓名:</b></td><td><%=patient.getName()%></td><td>&nbsp;&nbsp;</td><td><b>性别:</b></td><td><%=patient.getSexString()%></td>
    </tr>
    <tr>
        <td><b>年龄:</b></td><td><%=patient.getAge()%></td><td>&nbsp;&nbsp;</td><td><b>出生日期:</b></td><td><%=patient.getBornDateFormat()%></td>
    </tr>
    <tr>
        <td><b>身份证:</b></td><td><%=patient.getIdentityId()%></td><td>&nbsp;&nbsp;</td><td><b>电话:</b></td><td><%=patient.getPhone()%></td>
    </tr>
    <tr>
        <td><b>医保卡号:</b></td><td><%=patient.getMICN()%></td>
    </tr>
</table>
<br>

<hr align=center width="70%" SIZE=3>
<br>

<section class="main_box">
    <div class="box" id="app">
        <ul>
            <li :class="li.class" v-for="li in data">
                <a :href="li.href" target="_self">
                    <h3>{{li.name}}</h3>
                    <p>{{li.text}}</p>
                    <img :src="li.src" alt="img">
                </a>
            </li>
            <div style="clear: both"></div>
        </ul>
    </div>
</section>
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
<script>
    new Vue({
        el: "#app",
        data: function () {
            return {
                data:[
                    {class:"box_ul_li",href:"patientServlet?operation=addRegister",src:"images/1.jpeg",name:"挂号",text:"申请挂号"},
                    {class:"box_ul_li",href:"patientServlet?operation=register",src:"images/2.jpeg",name:"挂号",text:"查看挂号记录"},
                    {class:"box_ul_li on",href:"patientServlet?operation=drugRecord",src:"images/3.jpeg",name:"药品",text:"查看取药记录"},
                    {class:"box_ul_li",href:"patientServlet?operation=diagnoseRecord",src:"images/4.jpeg",name:"诊断",text:"查看诊断记录"},
                    {class:"box_ul_li",href:"patientServlet?operation=costRecord",src:"images/6.jpeg",name:"缴费",text:"查看缴费记录"},
                ]
            }
        }
    })
    $(".box ul li").hover(function(){
        $(this).addClass('on').siblings().removeClass('on');
    });
</script>
<center>
    <a href="login.jsp"><button class="red" type="button"><i class="icon ion-md-lock"></i>返回登录页面</button></a>
</center>
</body>
</html>
